package com.hncj1.hello;

public class computer {
    private String name;
    public void run(){
        System.out.println(name+"开机了");
    }

    public computer(String name) {
        this.name = name;
    }

    public void install(USB usb){
        usb.connect();
        if(usb instanceof keybroad){
            keybroad a = (keybroad)usb;
            a.click();


        }
        else {
            mouse b=(mouse)usb;
            b.click1();
        }
        usb.disconnect();
    }

}
